<template>
	<view class="float-btn">
		<view class="item" :key="index" v-for="(item, index) in value.list" @click.stop="redirectTo(item.link)"><image :src="$util.img(item.imageUrl)" mode="widthFix"></image></view>
	</view>
</template>

<script>
export default {
	name: 'diy-float-btn',
	components: {},
	props: {
		value: {
			type: Object,
			default: () => {
				return {};
			}
		}
	},
	data() {
		return {
		};
	},
	methods: {
		redirectTo(link) {
			this.$util.diyRedirectTo(link);
		}
	}
};
</script>

<style lang="scss">
.float-btn {
	position: fixed;
	bottom: 20%;
	right: 40rpx;
	z-index: 999;
	.item {
		margin-bottom: 20rpx;
		&:last-child {
			margin-bottom: 0;
		}
		image {
			width: 100rpx;
			height: 100rpx;
			box-shadow: 0 0 4rpx rgba(0, 0, 0, 0.2);
			border-radius: 50%;
			// background-color: #fff;
		}
	}
}
</style>
